package com.hbyj.object;

import java.util.Set;

import org.apache.poi.hssf.record.formula.functions.Var;
import org.hibernate.collection.PersistentSet;

import com.hbyj.hbm.vo.MemberRole;
import com.hbyj.hbm.vo.Members;

public class MemberForFlexiGrid implements IFlexiGridable {
	private int id;
	private String member_name;
	private String member_empName;
	private String member_role;
	private String member_department;
	private int member_department_id;
	private String member_remark;
	private String member_regionCode;
	
	public void initObjectByHibernateClass(Object hiberObj) {
		Members members=(Members)hiberObj;
		this.id=members.getId();
		this.member_name = members.getName();
		this.member_department = members.getDepartments().getName();
		this.member_department_id = members.getDepartments().getId();
		this.member_empName  = members.getEmpName();
		this.setMember_regionCode(members.getLyCode());
		Set sets = members.getMemberRoles();
		Object[] os = sets.toArray();
		MemberRole memberRole =(MemberRole)os[0];
		this.member_role = memberRole.getRoles().getName();
		this.setMember_remark(members.getRemarks());
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public void setMember_name(String member_name) {
		this.member_name = member_name;
	}

	public String getMember_name() {
		return member_name;
	}

	public void setMember_role(String member_role) {
		this.member_role = member_role;
	}

	public String getMember_role() {
		return member_role;
	}

	public void setMember_department(String member_department) {
		this.member_department = member_department;
	}

	public String getMember_department() {
		return member_department;
	}

	public void setMember_remark(String member_remark) {
		this.member_remark = member_remark;
	}

	public String getMember_remark() {
		return member_remark;
	}

	public void setMember_regionCode(String member_regionCode) {
		this.member_regionCode = member_regionCode;
	}

	public String getMember_regionCode() {
		return member_regionCode;
	}

	public void setMember_department_id(int member_department_id) {
		this.member_department_id = member_department_id;
	}

	public int getMember_department_id() {
		return member_department_id;
	}

	public String getMember_empName() {
		return member_empName;
	}

	public void setMember_empName(String memberEmpName) {
		member_empName = memberEmpName;
	}

	
	
}
